// requirejs 相关配置
require.config({
    paths: {
        'angular': '../vendor/lib/bower_components/angular/angular',
        'angular-route': '../vendor/lib/bower_components/angular-route/angular-route',
        'angular-animate': '../vendor/lib/bower_components/angular-animate/angular-animate',
        'angular-touch': '../vendor/lib/bower_components/angular-touch/angular-touch',
        'common_dir': '../vendor/directives/common_dir'
    },
    
    shim: {
        'angular': {
            exports: 'angular'
        },
        'angular-route': {
            deps: ['angular']
        },
        'angular-touch': {
            deps: ['angular']
        },
        'angular-animate': {
            deps: ['angular']
        }
    }
});

// 开始加载各类框架
require(['angular', 'app','angular-route', 'angular-touch', 'angular-swipe','angular-animate', 'routes','filter', 'controllers', 'common_dir', 'services', 'transData'], function(angular,app) {
    var $html = angular.element(document.getElementsByTagName('html')[0]);
    
    // domready后，手动启动扫描
    angular.element(document).ready(function() {
       angular.bootstrap(document,[app['name']]);
    });
    
});